Skip to content

fix: openstack needs to use neutron for floating ip association #484

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

blackboxsw
Copy link
Collaborator

@blackboxsw blackboxsw commented May 7, 2025

Description

Nova api microversion 2.44 doesn't support associating floating IPs via to compute API endpoint anymore.

Associating floating IPs to servers must be done via the neutron(network) API endpoints instead to avoid 404s during floating IP association to servers using the nova(compute) endoint.

Add an example/ostack.py basic lifecycle script to ease local testing of openstack instance lifecycle.

PR Checklist

To ease the process of reviewing your PR, do make sure to complete the following checklist before submitting a pull
request

  • I have added unit tests to cover the new behavior under ``tests/unit_tests/```
  • I have run tox -e format locally to automatically format my code before submitting
  • I have run tox locally ensuring that it passes before submitting
  • (if applicable) I have added a reference to issues that this PR relates to in the PR message (Refs GH-1234, Fixes GH-1234)
  • My commits are atomic and follow the convetional commit message format (https://www.conventionalcommits.org/en/v1.0.0/)

Otherwise, please leave the PR as a draft to indicate that it is still a work in progress.
-->

Additional Context and Relevant Issues

Upstream docs stating deprecated behavior for floating IPs in nova/compute
https://docs.openstack.org/api-ref/compute/#add-associate-floating-ip-addfloatingip-action-deprecated

Test Steps

@blackboxsw blackboxsw requested a review from TheRealFalcon May 7, 2025 18:43
Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good to me!

I'm assuming your unit test today is for this PR?

@blackboxsw blackboxsw force-pushed the fix-openstack-to-use-neutron-not-nova-for-ips branch 2 times, most recently from b0340ea to 0fec0ae Compare May 7, 2025 20:16
@blackboxsw
Copy link
Collaborator Author

Change looks good to me!

I'm assuming your unit test today is for this PR?

Unit test added to allow coverage of conneonts.network.update_ip and ports calls. It's all mocks anyway, but at least provides a bit of coverage about expected return values from those SDK calls.

@blackboxsw blackboxsw requested a review from TheRealFalcon May 7, 2025 20:22
@blackboxsw blackboxsw force-pushed the fix-openstack-to-use-neutron-not-nova-for-ips branch 3 times, most recently from a30cbe1 to e345e4f Compare May 7, 2025 22:14
Nova api microversion 2.44 doesn't support associating floating IPs
via to compute API endpoint anymore.

Associating floating IPs to servers must be done via the
neutron(network) API endpoints instead to avoid 404s during
floating IP association to servers using the nova(compute)
endoint.

Add an example/ostack.py basic lifecycle script to ease local
testing of openstack instance lifecycle.
Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@blackboxsw
Copy link
Collaborator Author

Dropped py38 from CI as ubuntu-20-04 environments are no longer supported in github workflows

@TheRealFalcon
Copy link
Member

at least 2 approving reviews??? What is this madness??

@blackboxsw blackboxsw merged commit 49357f7 into canonical:main May 8, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants